from flask import Flask, request, render_template, redirect

app = Flask(__name__)

def get_input(value):
    return '<input value="%s" />' %value

@app.route('/', methods=['GET', 'POST'])
def index():
    context = {
        "k1": 123,
        "k2": [11, 22, 33],
        "k3": {"name": "oldBoy", "age": 92},
        "k4": lambda x: x+1,
        "k5": get_input
    }
    return render_template('index.html', **context)

@app.template_filter()
def db():
    return 'ok'


if __name__ == '__main__':
    app.run()